import 'dart:async';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'plugin_image_method_channel.dart';

abstract class PluginImagePlatform extends PlatformInterface {
  /// Constructs a PluginImagePlatform.
  PluginImagePlatform() : super(token: _token);

  static final Object _token = Object();

  static PluginImagePlatform _instance = MethodChannelPluginImage();

  late Stream deviceStream;
  late StreamController<dynamic> deviceController;

  /// The default instance of [PluginImagePlatform] to use.
  ///
  /// Defaults to [MethodChannelPluginImage].
  static PluginImagePlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [PluginImagePlatform] when
  /// they register themselves.
  static set instance(PluginImagePlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future openCamera() {
    throw UnimplementedError('openPhotoAlbum() has not been implemented.');
  }

  Future<Map?> openPhotoAlbum() {
    throw UnimplementedError('openPhotoAlbum() has not been implemented.');
  }
}
